package b.sync.domain

import b.sync.utils.Macros
import cats.effect._

import scala.language.experimental.macros

trait Extractor[R] extends DbSync {

  val stmtQuery: String

  protected def macroExtract[A]: IO[List[(A, Int, Int)]] = macro Macros.extract[A]

  def extract(from: Long): IO[List[(R, Int, Int)]]
}
